﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="moreDetails.aspx.cs" Inherits="moreDetails" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>Product Details</title>
    <link href="CSS/Search.css" rel="stylesheet" type="text/css" />
    <!-- JQGRID-->
    <script src="JS/Plugins/jquery-1.7.1.min.js" type="text/javascript"></script>
    <%--<script src="Scripts/jquery-1.4.2.min.js" type="text/javascript"></script>--%>
    <link href="CSS/sliderFormStyle.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="js/sliding.form.js"></script>
    <style>
        #main-wrap
        {
            height: auto;
        }
        #content
        {
            height: auto;
        }
    </style>
    <script type="text/javascript">

        $(document).ready(function () {
            var param = getParameterByName('proid');
            if (param != null && param != "") {

                var jData = {};
                jData.productId = param;

                $.ajax({
                    type: "POST",
                    url: "ProductService.svc/fetchSalesUserProducts",
                    data: JSON.stringify(jData),
                    contentType: "application/json; charset=utf-8",
                    dataType: "json",
                    success: function (response) {
                        var Result = eval('(' + response.d + ')');
                        $('#txtSearchID').html(param);
                        $('#txtProduct').html(Result["Product"]);
                        $('#txtBrand').html(Result["Brand"]);
                        $('#txtModel').html(Result["Model"]);
                        $('#txtSeries').html(Result["Series"]);
                        $('#txtColor').html(Result["Color"]);

                        $('#txtMotherBoard').html(Result["MotherBoard"]);
                        $('#txtProcessor').html(Result["Processor"]);
                        $('#txtRam').html(Result["Ram"]);
                        $('#txtScreenType').html(Result["ScreenType"]);
                        $('#txtScreenSize').html(Result["ScreenSize"]);
                        $('#txtOpticalDiskDrive').html(Result["OpticalDiskdrive"]);

                        $('#txtUSB').html(Result["Usb"]);
                        $('#txtModemEthernet').html(Result["ModemEthernet"]);
                        $('#txtBluetooth').html(Result["Bluetooth"]);
                        $('#txtTVOutput').html(Result["TVOutput"]);
                        $('#txtSound').html(Result["SoundCard"]);
                        $('#txtKeyboardMouse').html(Result["KeyboardAndMouse"]);
                        $('#txtAccessories').html(Result["Accessories"]);
                        $('#txtOperatingSystem').html(Result["OperatingSystem"]);
                        $('#txtGraphicsCard').html(Result["GraphicsCard"]);
                        $('#txtScreenResolution').html(Result["ScreenResolution"]);
                        $('#txtHardDrive').html(Result["HardDrive"]);
                        $('#txtMemoryCardReader').html(Result["MemoryCardReader"]);
                        $('#txtWifi').html(Result["Wifi"]);
                        $('#txtAudioInterface').html(Result["AudioInterface"]);
                        $('#txtCardSlot').html(Result["ExpantionCardSlot"]);
                        $('#txtWebcam').html(Result["Webcam"]);
                        $('#txtBattery').html(Result["Battery"]);
                        $('#txtSoftwareIncluded').html(Result["SoftwareIncluded"]);
                        $('#txtPrice').html(Result["Price"]);
                        $('#txtDiscount').html(Result["Discount"]);
                        $('#Checkbox1').html(Result["HomeDelivery"]);

                    },
                    failure: function (msg) {
                        alert(msg);
                    },
                    error: function (jqXHR, exception) {
                        if (jqXHR.status === 0) {
                            alert('Not connect.\n Verify Network.');
                        } else if (jqXHR.status == 404) {
                            alert('Requested page not found. [404]');
                        } else if (jqXHR.status == 500) {
                            alert('Internal Server Error [500].');
                        } else if (exception === 'parsererror') {
                            alert('Requested JSON parse failed.');
                        } else if (exception === 'timeout') {
                            alert('Time out error.');
                        } else if (exception === 'abort') {
                            alert('Ajax request aborted.');
                        } else {
                            alert('Uncaught Error.\n' + jqXHR.responseText);
                        }
                    }

                });


            }
            //alert(param);
        });

        function getParameterByName(name) {
            name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
            var regexS = "[\\?&]" + name + "=([^&#]*)";
            var regex = new RegExp(regexS);
            var results = regex.exec(window.location.href);
            if (results == null)
                return "";
            else
                return decodeURIComponent(results[1].replace(/\+/g, " "));
        }

    </script>
</head>
<body>
    <div id="main-wrap">
        <div id="content">
            <div id="products">
                <div class="newboxes" id="newboxes2">
                    <div id="cont">
                        <div id="wrap">
                            <div id="navi">
                                <ul style="padding-left: 125px">
                                    <li class="selected"><a href="#">Basic details</a> </li>
                                    <li><a href="#">Features</a> </li>
                                    <li><a href="#">Price</a> </li>
                                </ul>
                            </div>
                            <div id="stepss">
                                <form id="formE" name="formE" action="" method="post">
                                <fieldset class="step">
                                    <legend></legend>
                                    <p style="margin-left: 230px">
                                        <label for="title">
                                            Product ID</label>
                                        <span id="txtSearchID"></span>
                                    </p>
                                    <p style="margin-left: 230px">
                                        <label for="title">
                                            Product</label>
                                        <span id="txtProduct"></span>
                                    </p>
                                    <p style="margin-left: 230px">
                                        <label for="brand">
                                            Brand</label>
                                        <span id="txtBrand"></span>
                                    </p>
                                    <p style="margin-left: 230px">
                                        <label for="model">
                                            Model</label>
                                        <span id="txtModel"></span>
                                    </p>
                                    <p style="margin-left: 230px">
                                        <label for="series">
                                            Series</label>
                                        <span id="txtSeries"></span>
                                    </p>
                                    <p style="margin-left: 230px">
                                        <label for="color">
                                            Color</label>
                                        <span id="txtColor"></span>
                                    </p>
                                </fieldset>
                                <fieldset class="step">
                                    <legend></legend>
                                    <table>
                                        <tr>
                                            <td>
                                                <p>
                                                    <label for="motherboard">
                                                        MotherBoard</label>
                                                    <span id="txtMotherBoard"></span>
                                                </p>
                                            </td>
                                            <td>
                                                <p>
                                                    <label for="OperatingSystem">
                                                        Operating system</label>
                                                    <span id="txtOperatingSystem"></span>
                                                </p>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <p>
                                                    <label for="processor">
                                                        Processor</label>
                                                    <span id="txtProcessor"></span>
                                                </p>
                                            </td>
                                            <td>
                                                <p>
                                                    <label for="GrapicsCard">
                                                        Graphics card</label>
                                                    <span id="txtGraphicsCard"></span>
                                                </p>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <p>
                                                    <label for="RAM">
                                                        RAM</label>
                                                    <span id="txtRam"></span>
                                                </p>
                                            </td>
                                            <td>
                                                <p>
                                                    <label for="Screen resolution">
                                                        Screen resolution</label>
                                                    <span id="txtScreenResolution"></span>
                                                </p>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <p>
                                                    <label for="ScreenType">
                                                        Screen type</label>
                                                    <span id="txtScreenType"></span>
                                                </p>
                                            </td>
                                            <td>
                                                <p>
                                                    <label for="HardDrive">
                                                        Hard drive</label>
                                                    <span id="txtHardDrive"></span>
                                                </p>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <p>
                                                    <label for="ScreenSize">
                                                        Screen size</label>
                                                    <span id="txtScreenSize"></span>
                                                </p>
                                            </td>
                                            <td>
                                                <p>
                                                    <label for="MemoryCardReader">
                                                        Memory card reader</label>
                                                    <span id="txtMemoryCardReader"></span>
                                                </p>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <p>
                                                    <label for="OpticalDiskDrive">
                                                        Optical disk drive</label>
                                                    <span id="txtOpticalDiskDrive"></span>
                                                </p>
                                            </td>
                                            <td>
                                                &nbsp;
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <p>
                                                    <label for="USB">
                                                        USB</label>
                                                    <span id="txtUSB"></span>
                                                </p>
                                            </td>
                                            <td>
                                                <p>
                                                    <label for="WiFi">
                                                        WiFi</label>
                                                    <span id="txtWifi"></span>
                                                </p>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <p>
                                                    <label for="ModemEthernet">
                                                        Modem/Ethernet</label>
                                                    <span id="txtModemEthernet"></span>
                                                </p>
                                            </td>
                                            <td>
                                                <p>
                                                    <label for="AudioInterface">
                                                        Audio Interface</label>
                                                    <span id="txtAudioInterface"></span>
                                                </p>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <p>
                                                    <label for="Bluetooth">
                                                        Bluetooth</label>
                                                    <span id="txtBluetooth"></span>
                                                </p>
                                            </td>
                                            <td>
                                                <p>
                                                    <label for="ExpansonCardSlot">
                                                        Expanson Card Slot</label>
                                                    <span id="txtCardSlot"></span>
                                                </p>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <p>
                                                    <label for="TVoutput">
                                                        TV Output</label>
                                                    <span id="txtTVOutput"></span>
                                                </p>
                                            </td>
                                            <td>
                                                <p>
                                                    <label for="Webcam">
                                                        Webcam</label>
                                                    <span id="txtWebcam"></span>
                                                </p>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <p>
                                                    <label for="Sound">
                                                        Sound</label>
                                                    <span id="txtSound"></span>
                                                </p>
                                            </td>
                                            <td>
                                                <p>
                                                    <label for="Batery">
                                                        Battery</label>
                                                    <span id="txtBattery"></span>
                                                </p>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <p>
                                                    <label for="KeyboardMouse">
                                                        Keyboard & Mouse</label>
                                                    <span id="txtKeyboardMouse"></span>
                                                </p>
                                            </td>
                                            <td>
                                                <p>
                                                    <label for="SoftwareIncluded">
                                                        Software Included</label>
                                                    <span id="txtSoftwareIncluded"></span>
                                                </p>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <p>
                                                    <label for="AccessoriesIncluded">
                                                        Accessories Included</label>
                                                    <span id="txtAccessories"></span>
                                                </p>
                                            </td>
                                            <td>
                                                &nbsp;
                                            </td>
                                        </tr>
                                    </table>
                                </fieldset>
                                <fieldset class="step">
                                    <legend></legend>
                                    <p style="margin-left: 230px">
                                        <label>
                                            Price</label>
                                        <span id="txtPrice"></span>
                                    </p>
                                    <p style="margin-left: 230px">
                                        <label for="Discount">
                                            Discount</label>
                                        <span id="txtDiscount"></span>
                                    </p>
                                   <%-- <p style="margin-left: 230px">
                                        <label for="HomeDelivery">
                                            Home delivery</label>
                                        <input id="Checkbox1" name="HomeDelivery" type="checkbox" />
                                    </p>--%>
                                </fieldset>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            
        </div>
    </div>
    <!-- The JavaScript -->
    <script type="text/javascript">
        $(function () {
            /**
            * the menu
            */
            var $menu = $('#ldd_menu');
            /**
            * for each list element,
            * we show the submenu when hovering and
            * expand the span element (title) to 510px
            */
            $menu.children('li').each(function () {
                var $this = $(this);
                var $span = $this.children('span');
                $span.data('width', $span.width());

                $this.bind('mouseenter', function () {
                    $menu.find('.ldd_submenu').stop(true, true).hide();
                    $span.stop().animate({ 'width': '510px' }, 300, function () {
                        $this.find('.ldd_submenu').slideDown(300);
                    });
                }).bind('mouseleave', function () {
                    $this.find('.ldd_submenu').stop(true, true).hide();
                    $span.stop().animate({ 'width': $span.data('width') + 'px' }, 300);
                });
            });
        });
    </script>
    <!-- JQGRID SCRIPT -->
</body>
</html>
